<template>
  <div class="content_box">
    <div class="visitedRecords">
      <div class="visitedRecords_head">
        <el-input v-model="name" placeholder="客户名称/客户跟进人" />
        <el-select v-model="region" placeholder="请选择客户分类">
          <el-option label="区域一" value="shanghai" />
          <el-option label="区域二" value="beijing" />
        </el-select>
        <el-select v-model="status" placeholder="请选择合作状态">
          <el-option label="区域一" value="shanghai" />
          <el-option label="区域二" value="beijing" />
        </el-select>
        <el-button type="primary">搜索</el-button>
      </div>
      <div class="visitedRecords_form">
        <el-table
          :data="visitedRecords"
          border
          fit
          highlight-current-row
          style="width: 100%"
          :element-loading-text="g.loadingStr"
          :header-cell-style="{ background: g.mainColor }"
        >
          <el-table-column label="序号" align="center" fixed>
            <template>
              <span />
            </template>
          </el-table-column>
          <el-table-column label="联系时间" align="center" fixed>
            <template>
              <span />
            </template>
          </el-table-column>
          <el-table-column label="客户名称" align="center" fixed>
            <template>
              <span />
            </template>
          </el-table-column>
          <el-table-column label="合作状态" align="center" fixed>
            <template>
              <span />
            </template>
          </el-table-column>
          <el-table-column label="客户分类" align="center" fixed>
            <template>
              <span />
            </template>
          </el-table-column>
          <el-table-column label="客户跟进人" align="center" fixed>
            <template>
              <span />
            </template>
          </el-table-column>
        </el-table>
      </div>
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryList.currentPage"
        :limit.sync="queryList.pageSize"
      />
    </div>
    <div class="visitedLog">
      <h3>拜访记录</h3>
      <div class="progressBar">
        <el-timeline :reverse="reverse">
          <el-timeline-item
            v-for="(activity, index) in activities"
            :key="index"
            :timestamp="activity.timestamp"
          >
            {{ activity.content }}
          </el-timeline-item>
        </el-timeline>
      </div>
    </div>
  </div>
</template>

<script>
import Pagination from '@/components/Pagination'
export default {
  name: 'VisitedRecords',
  components: { Pagination },
  data() {
    return {
      name: '',
      region: '',
      status: '',
      visitedRecords: [],
      reverse: true,
      activities: [{
        content: '活动按期开始',
        timestamp: '2018-04-15'
      }, {
        content: '通过审核',
        timestamp: '2018-04-13'
      }, {
        content: '创建成功',
        timestamp: '2018-04-11'
      }],
      queryList: {
        currentPage: 1,
        pageSize: 10
      },
      total: 1
    }
  }
}
</script>

<style scoped lang='scss'>
.content_box {
  padding: 10px;
  display: flex;
  .visitedRecords {
    width: 70%;
    margin-right: 15px;
    /deep/ .el-input {
      width: 200px !important;
    }
    .visitedRecords_head {
      margin-bottom: 10px;
    }
  }
  .visitedLog {
    flex: 1;
    border: 1px solid #ccc;
    background-color: #f2f7ff;
    h3 {
      background-color: #fff;
      margin: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 50px;
      line-height: 50px;
      border-bottom: 1px solid #ccc;
    }
    .progressBar {
      padding: 20px 0;
    }
  }
}
</style>
